<?php
/**
 * Created by PhpStorm.
 * User: Sing
 * Date: 16/9/27
 * Time: 13:29
 */

Class SPClient extends SoapClient{

    private $myLocation = "http://api.one-stop.xinglongdayuan.com/soap/?mid=NICYEBMGHQ";
    private $_className;

    public function __construct(){
        parent::__construct(null, array('uri' => "sichem.cn/soap",'location'=>$this->myLocation,'trace'=>true));
    }

    public function setClass($className){
        $this->_className = $className;
    }

    public function __call($fname,$args){
         return $this->__soapCall("SoapClass",array($this->_className,$fname,$args));
    }
}
try{
    echo microtime();
    echo '<br />';
    //调用
    $client = new SPClient();

    $client->setClass("outlet_inventory");
    $rs = $client->getlist("dfsdf");
    echo microtime();
    var_dump($rs);
}catch(Exception $e){
    echo $e->getMessage();
}